<?php

use Illuminate\Support\Facades\Route;


//Route::domain('admin.datc.yu')->group(function () {
//
//});
Route::post('/login', 'LoginController@index');//登录

Route::group(['middleware' => ['auth:admin']], function () {
    //管理人员
    Route::group(['prefix' => 'manager'], function () {
        Route::get('/', 'ManagerController@list')->name('admin.manager.list');//列表
        Route::get('/user', 'ManagerController@user')->name('admin.manager.user');//用户
        Route::post('/update', 'ManagerController@update')->name('admin.manager.update');//更新
        Route::post('/lock', 'ManagerController@lock')->name('admin.manager.lock');//锁定
        Route::post('/active', 'ManagerController@active')->name('admin.manager.active');//激活
        Route::post('/destroy', 'ManagerController@destroy')->name('admin.manager.destroy');//删除
    });
    //文章管理
    Route::group(['prefix' => 'article'], function () {
        Route::get('/', 'ArticleController@list')->name('admin.article.list');//列表
        Route::get('/info', 'ArticleController@info')->name('admin.article.info');//详情
        Route::get('/count', 'ArticleController@count')->name('admin.article.count');//统计
        Route::post('/destroy', 'ArticleController@destroy')->name('admin.article.destroy');//删除
        Route::get('/chart', 'ArticleController@chart')->name('admin.article.chart');//统计
    });
    //管理人员
    Route::group(['prefix' => 'user'], function () {
        Route::get('/', 'UserController@list')->name('admin.user.list');//列表
    });
});



